package com.alangyun.remind.repository.algorithm;

/**
 * 专业专项表彰
 *
 * @class com.alangyun.remind.repository.algorithm.SpecialReward
 * @company 北京诚朗信息技术有限公司
 * @author hoobort klxukun@126.com
 * @datetime 2022年11月23日 下午4:58:33
 *
 */
public enum SpecialReward implements IFactorEnum {
	GJ("国家级",0.8, 0.0, 0.0),
	GW("国网公司(省部)级",0.5, 0.0, 0.0),
	SGS("省公司(市)级",0.1, 0.0, 0.0),
	DS("地市公司(县)级",0.05, 0.0, 0.0),
	XIAN("县公司级",0.025, 0.0, 0.0);

	private String keyCode;
	private double standVal;
	private double minVal;
	private double maxVal;

	private SpecialReward(String k, double standard, double min, double max) {
		this.keyCode = k;
		this.standVal = standard;
		this.minVal = min;
		this.maxVal = max;
	}

	public String key() {
		return keyCode;
	}

	public double standard() {
		return standVal;
	}

	public double min() {
		return minVal;
	}

	public double max() {
		return maxVal;
	}

	public static SpecialReward keyOf(String key) {
		SpecialReward ret=null;
		if(GJ.key().equals(key))
			ret=GJ;
		else if(GW.key().equals(key))
			ret=GW;
		else if(SGS.key().equals(key))
			ret=SGS;
		else if(DS.key().equals(key))
			ret=DS;
		else if(XIAN.key().equals(key))
			ret=XIAN;
		
		return ret;
	}
}
